#!/bin/bash

dir=`pwd`
builddir=$1

echo " Set Go Path: $dir"
export GOPATH=$dir

cd ./src/

if [ "$1" == "" ] ; then
    echo " Usage: ./$1 dirname [install]"
    exit
fi

echo " go build $builddir"
go build $builddir

if [ "$2" == "install" ]; then
    echo "go install $builddir"
    go install $builddir
fi
